package com.itheima.controller;

import com.itheima.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class AccountController {
    @Autowired
    private AccountService accountService;

    public void transfer(String fromName,String toName,double money){
        try {
            accountService.transfer(fromName,toName,money);
            System.out.println("转账成功...");
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("转账失败...");
        }
    }
}
